﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IssueTracker.Helper
{
    public class WorkflowServiceEventHelper
    {
        static public IDictionary<string, string> GetEventList(string currentStateName)
        {
            //TODO: Haven't figure out to do it dynamically, hard code first
            //http://dotnetperls.com/Content/Dictionary-Keys.aspx
            IDictionary<string, string> returnEventList = new Dictionary<string, string>();

            switch (currentStateName)
            {
                case "Pending Approval":
                    returnEventList.Add("Approval", "IssueApproved");
                    returnEventList.Add("Reject", "IssueRejected");
                    break;
                case "Pending Solution":
                    returnEventList.Add("Complete", "SolutionCompleted");
                    break;

                case "Pending Testing":
                    returnEventList.Add("Accept", "SolutionAccepted");
                    returnEventList.Add("Reject", "SolutionRejected");
                    break;
            }

            return returnEventList;
        }

    }
}
